﻿using Azure.Core;
using DataModels.Dto;
using DataModels.Dto.Livelihood;
using DataModels.Entities.Base;
using DataModels.Entities.Livelihood;
using Microsoft.AspNetCore.Mvc;
using PropertyManagementWebApi.Controllers;
using Services.Community;
using Services.Decoration;
using Services.Livelihood;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Utils;

namespace DataModels.Enums.Livelihood
{
    public class HouseRentSaleController(HouseRentSaleService houseRentSaleService) : BaseController
    {
        protected readonly HouseRentSaleService _houseRentSaleService = houseRentSaleService;

        /// <summary>
        /// 获取房屋租售列表 add by tianjh 20250808
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpGet]
        public ResponseModel GetHouseRentSaleList([FromQuery] HouseRentSalePageRequest request)
        {
            return _houseRentSaleService.GetHouseRentSaleList(request);
        }

        /// <summary>
        /// 获取房屋租售的小区列表 add by tianjh 20250811
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public ResponseModel GetHouseRentSaleProjectList() 
        {
            return _houseRentSaleService.GetHouseRentSaleProjectList();
        }

        /// <summary>
        /// 房屋租售预约需求 绑定下拉框用
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public ResponseModel GetHouseRentSaleDemandList()
        {
            return _houseRentSaleService.GetHouseRentSaleDemandList();
        }

        /// <summary>
        /// 一键预约
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost]
        public ResponseModel OneKeyReservation(HouseRentSaleReservationInfo request)
        {
            return _houseRentSaleService.OneKeyReservation(request);
        }

    }
}
